package com.wu.service;

import com.wu.dao.StudentMapper;
import com.wu.pojo.Student;

import java.util.List;

/**
 * Created by wsq547 on 2021/10/3 20:58
 */
public class StudentServiceImpl implements StudentService {

    private StudentMapper studentMapper;

    public void setStudentMapper(StudentMapper studentMapper) {
        this.studentMapper = studentMapper;
    }

    public int addStudent(Student student) {
        return studentMapper.addStudent(student);
    }

    public int deleteStudentById(int id) {
        return studentMapper.deleteStudentById(id);
    }

    public int updateStudent(Student student) {
        return studentMapper.updateStudent(student);
    }

    public Student queryStuedntById(int id) {
        return studentMapper.queryStuedntById(id);
    }

    public List<Student> queryAllStudent() {
        return studentMapper.queryAllStudent();
    }

    public Student queryStudentByName(String studentName) {
        return studentMapper.queryStudentByName(studentName);
    }
}
